set the pSectButtonSpriteList of gScript to [11, 12]
set the pSectButtonFirstMemNum of gScript to the number of member "prod01"
set tCommandList to ["displayRefInfo([#text:#product],TRUE)", "showWhiteSections"]
repeat with i = 1 to count(the pSectButtonSpriteList of gScript)
set currSpriteNum to getAt(the pSectButtonSpriteList of gScript, i)
addProp(the pButtonObjectList of gScript, currSpriteNum, birth(script "sectButton Parent Script", currSpriteNum, the pSectButtonFirstMemNum of gScript + ((i * 3) - 3), i, getAt(tCommandList, i)))
end repeat
set the pSectButtonSpriteListTwo of gScript to [the pWhiteSprite_a of gScript, the pWhiteSprite_b of gScript, the pWhiteSprite_c of gScript, the pWhiteSprite_d of gScript, the pWhiteSprite_e of gScript]
set the pSectButtonFirstMemNumTwo of gScript to the number of member "white_a01"
set tCommandListTwo to ["displayRefInfo([#text:#white_a])", "displayRefInfo([#text:#white_b])", "displayRefInfo([#text:#white_c])", "displayRefInfo([#text:#white_d])", "displayRefInfo([#text:#white_e])"]
repeat with j = 1 to count(the pSectButtonSpriteListTwo of gScript)
set currSpriteNum to getAt(the pSectButtonSpriteListTwo of gScript, j)
addProp(the pButtonObjectList of gScript, currSpriteNum, birth(script "sectButton Parent Script Two", currSpriteNum, the pSectButtonFirstMemNumTwo of gScript + ((j * 3) - 3), j, getAt(tCommandListTwo, j)))
end repeat
set tBar to 6
set tTop to 7
set tBot to 8
set tThm to 9
set tPrt to 13
set the pThumbSprite of gScript to tThm
set tStdButtonList to [[#sprite: tPrt, #firstMember: the number of member "print01", #command: "printCurrentText", #repeat: 0, #down: 0, #delay: 15], [#sprite: tBar, #firstMember: the number of member "scrbar01", #command: "mClickScrollBar(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tTop, #firstMember: the number of member "scrtop01", #command: "mClickUpArrow(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tBot, #firstMember: the number of member "scrbot01", #command: "mClickDownArrow(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #delay: 15], [#sprite: tThm, #firstMember: the number of member "scrthm01", #command: "mClickBoxButton(the pScrollBarObj of gScript)", #repeat: 1, #down: 1, #forceRoll: 1]]
repeat with tCurrButtonProps in tStdButtonList
addProp(the pButtonObjectList of gScript, the sprite of tCurrButtonProps, new(script "stdButtonClass", tCurrButtonProps))
end repeat
updateStage()
set the pScrollBarObj of gScript to new(script "ScrollBarClass", [#pTopArrowSprite: tTop, #pBotArrowSprite: tBot, #pBoxButtonSprite: tThm, #pScrollBarSprite: tBar, #pFieldMember: member "textDisplay"])
mClickOnButton(getaProp(the pButtonObjectList of gScript, 11), "Mouse Down", 1)
end
on initRefText
set tFileList to [#product: "faxable1.txt", #white_a: "review2.txt", #white_b: "r14upgr2.txt", #white_c: "r14prgd1.txt", #white_d: "r14prgd2.txt", #white_e: "cbtwhite.txt"]
set the pDisplayTextList of gScript to [:]
if not doesXtraExist("fileio") then
alert("The FileIO Xtra is not in the Xtras directory.")
exit
end if
set tFileIO to new(xtra("fileio"))
if not objectp(tFileIO) then
alert("Problem using FileIO Xtra, check to make sure it's there ...")
exit
end if
repeat with i = 1 to count(tFileList)
set tFileName to the pathName & getAt(tFileList, i)
openFile(tFileIO, tFileName, 1)
set tString to readFile(tFileIO)
set tStatus to status(tFileIO)
closeFile(tFileIO)
set tCurrProp to getPropAt(tFileList, i)
if tStatus <> 0 then
addProp(the pDisplayTextList of gScript, tCurrProp, "Couldn't load text file: " & tFileName)
next repeat
end if
set tString to removeLFCharFromText(tString)
addProp(the pDisplayTextList of gScript, tCurrProp, tString)
end repeat
set tFileIO to 0
end
on cleanUpBeforeLeaving
if listp(the pButtonObjectList of gScript) then
repeat with i = 1 to count(the pButtonObjectList of gScript)
set tActPos to getPos(the actorList, getAt(the pButtonObjectList of gScript, i))
if tActPos > 0 then
deleteAt(the actorList, tActPos)
end if
end repeat
end if
set the pButtonObjectList of gScript to [:]
end
on displayRefInfo myProps, myHideWhiteSectionsFlag
if myHideWhiteSectionsFlag = 1 then
hideWhiteSections()
set the pSectCurrent of getaProp(the pButtonObjectList of gScript, the pWhiteSprite_a of gScript) to 0
end if
put getaProp(the pDisplayTextList of gScript, the text of myProps) into field "textDisplay"
reset(the pScrollBarObj of gScript)
end
on showWhiteSections
set the visible of sprite the pWhiteSprite_a of gScript to 1
set the visible of sprite the pWhiteSprite_b of gScript to 1
set the visible of sprite the pWhiteSprite_c of gScript to 1
set the visible of sprite the pWhiteSprite_d of gScript to 1
set the visible of sprite the pWhiteSprite_e of gScript to 1
set the visible of sprite (the pWhiteSprite_a of gScript + 5) to 1
set the visible of sprite (the pWhiteSprite_b of gScript + 5) to 1
set the visible of sprite (the pWhiteSprite_c of gScript + 5) to 1
set the visible of sprite (the pWhiteSprite_d of gScript + 5) to 1
set the visible of sprite (the pWhiteSprite_e of gScript + 5) to 1
mClickOnButton(getaProp(the pButtonObjectList of gScript, the pWhiteSprite_a of gScript), "Mouse Down", 1)
end
on hideWhiteSections
set the visible of sprite the pWhiteSprite_a of gScript to 0
set the visible of sprite the pWhiteSprite_b of gScript to 0
set the visible of sprite the pWhiteSprite_c of gScript to 0
set the visible of sprite the pWhiteSprite_d of gScript to 0
set the visible of sprite the pWhiteSprite_e of gScript to 0
set the visible of sprite (the pWhiteSprite_a of gScript + 5) to 0
set the visible of sprite (the pWhiteSprite_b of gScript + 5) to 0
set the visible of sprite (the pWhiteSprite_c of gScript + 5) to 0
set the visible of sprite (the pWhiteSprite_d of gScript + 5) to 0
set the visible of sprite (the pWhiteSprite_e of gScript + 5) to 0